layui.config({
	base : "js/"
}).use(['form','layer','jquery','layedit','laydate'],function(){
	var form = layui.form(),
		layer = parent.layer === undefined ? layui.layer : parent.layer,
		laypage = layui.laypage,
		layedit = layui.layedit,
		laydate = layui.laydate,
		$ = layui.jquery;

	//创建一个编辑器
	
	
 	var editIndex = layedit.build('news_content');
 	var addNewsArray = [],addNews;
 	var orgId = window.sessionStorage.getItem("organizeId");
 	var notId = window.sessionStorage.getItem("tempMsgEditId");
 	
	
 	$.ajax({
		url: $.httpRootPath() + "/api/web/tempMsg/i/" + orgId + "/" + notId,
		type: "get",
		dataType: "json",
		success: function(data) {
			if(data.code == "00") {
				fillData(data.data);
			} else {
				layer.alert('加载失败', {
					icon: 6,
					title: '友情提示'
				});
			}

		}
	})
 	
 	function fillData(data){
 		$(".title").val(data.title),
       	$(".content").val(data.content),
       	$(".url").val(data.url),
       	$(".remark").val(data.remark),
       	$(".createMan").val(data.createMan),
       	$(".createTime").val(data.createTime),
       	$(".updateMan").val(data.updateMan),
       	$(".updateTime").val(data.updateTime),
       	$(".reply").val(data.reply),
       	$(".state").val(data.state),
       	$(".msgType").val(data.msgType),
       	$(".pushCount").val(data.pushCount)
       				
 	}
})

